package com.lingkang.ztgateway.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author linke
 * @date 2020/11/12 21:47
 * @description
 */
@RestController
@RequestMapping("gatewat")
@RefreshScope //用于动态刷新
public class GatewayController {

  @Value("${user.name}")
  private String name;

  @GetMapping("name")
  public String name(){
    return name;
  }
}
